package com.design.behavior.interpreter.cainiao;

/**
 * @ProjectName: design
 * @Package: com.design.behavior.interpreter.cainiao
 * @ClassName: TerminalExpression
 * @Author: shenaiguo
 * @Description:
 * @Date: 2020/12/5 0005 17:35
 */
public class TerminalExpression implements Expression {
    private String data;

    public TerminalExpression(String data){
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        if(context.contains(data)){
            return true;
        }
        return false;
    }
}
